﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BLL
{
    public partial class Log_Check
    {
        public bool IsFirestCheck(PublicEnum.ObjectType_Check objectType,int objectId)
        {
            string sqlStr = "select Id from Log_Check where ObjectType = "+Convert.ToInt32(objectType).ToString()+" and ObjectId = "+objectId.ToString();
            return DAL.Common.Exist(sqlStr);
        }

        public Model.Log_Check Get_LastLog(int objectId, PublicEnum.ObjectType_Check objectType)
        {
            List<Model.Log_Check> list = this.GetModelList("ObjectId = " + objectId + " and ObjectType = " + Convert.ToInt32(objectType) + " and IsDispose = 0");
            if (list.Count<1)
            {
                return null;
            }
            return list[0];
        }
    }
}
